// electron-main/index.ts
import {app, BrowserWindow} from "electron"
import path from "path"

const createWindow = () => {
    const win = new BrowserWindow({
        webPreferences: {
            preload: path.join(__dirname, "./preload.js"), // 需要引用js文件
        },
        autoHideMenuBar: true
    })
    win.loadURL('http://localhost:5173')
}
app.whenReady().then(() => {
    createWindow() // 创建窗口
})